package com.yanqu.road.entity.activity;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.activity.huashigang.HuaShiGangFloorCellData;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author wpj
 * @Date 2020/10/11
 */
@FieldTypeAnnotation(tableName = "t_u_activity_dig_floor")
public class ActivityUserDigFloor extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    int activityId;
    @FieldTypeAnnotation(select = true, update = true)
    long userId;
    @FieldTypeAnnotation(desc = "层数")
    int floor;
    @FieldTypeAnnotation(desc = "单层数据")
    List<HuaShiGangFloorCellData> cellDataList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "是否获得过大奖,0否1是")
    int gotBigReward;

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }

    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }

    }
    public void setFloor(int floor) {
        if (this.floor != floor) {
            this.floor = floor;
            setOp(DataStatus.Update);
        }

    }

    public int getActivityId() {
        return activityId;
    }

    public long getUserId() {
        return userId;
    }

    public int getFloor() {
        return floor;
    }

    public List<HuaShiGangFloorCellData> getCellDataList() {
        return cellDataList;
    }

    public void setCellDataList(List<HuaShiGangFloorCellData> cellDataList) {
        this.cellDataList = cellDataList;
        setUpdateOption();
    }

    public int getGotBigReward() {
        return gotBigReward;
    }

    public void setGotBigReward(int gotBigReward) {
        if (this.gotBigReward != gotBigReward) {
            this.gotBigReward = gotBigReward;
            setOp(DataStatus.Update);
        }
    }
}
